﻿using Domain.Entity;
using Domain.Entity.zct;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domain.IRepository
{
    public interface IUserRepository
    {
        //登录
        Task<UserRole> GetUser(string account,string pwd);

        //根据用户id查询用户
        Task<User> GetUserById(int uid);

        //修改密码
        Task<int> UpdatePwd(int uid,string pwd);

        //修改个人信息
        Task<int> UpdateInfo(string? name,string? sex,string? phone,string? avatar,int id);

        //查询所有用户
        Task<List<User>> GetAllUser();

        //根据部门id查询用户
        Task<List<User>> GetUserByDeptId(int depid);

        //全部查
        Task<FenYe<User>> GetAll(FenYe<User> fenYe);

        //条件查
        Task<FenYe<User>> GetCondition(FenYe<User> fenYe, string? User_account, string? User_name, int? Position_id, int? User_status);

        //停用
        Task<int> GetDeactivated(int id);

        //启用
        Task<int> GetEnable(int id);

        //编辑
        Task<int> GetEdit(int[] Role_id, User user);

        //添加
        Task<int> GetAdd(int[] Role_id, User user);

        //删除
        Task<int> GetDelete(int id);

        //id查询
        Task<User> GetID(int id);
    }
}
